<?php

class IndexController extends Zend_Controller_Action
{

    public function init()
    {
        /* Initialize action controller here */
        $this->view->baseUrl = $this->_request->getBaseUrl();
        $this->view->cliente = Zend_Auth::getInstance()->getIdentity();
    }

    public function indexAction()
    {
        // action body
    }

    public function nosotrosAction()
    {
        // action body
        $this->view->titulo = "Nosotros";
    }

    public function contactenosAction()
    {
        $this->view->titulo = "Contáctenos";
        //guardo esta paguina en mi historial
        require_once APPLICATION_PATH . '/helpers/UltimaPagVisitada.php';
        //Application_Helper_UltimaPagVisitada::saveThis($this->_request->getRequestUri());
        Application_Helper_UltimaPagVisitada::guardar("contactenos");
    }

    public function mapaAction()
    {
        $this->view->titulo = "Mapa";
        require_once APPLICATION_PATH . '/helpers/UltimaPagVisitada.php';
        //$this->view->ultima_visita = Application_Helper_UltimaPagVisitada::getLastVisited();
        $this->view->ultima_visita = Application_Helper_UltimaPagVisitada::obtenerUltimaVisita();
        echo $this->view->ultima_visita;
    }


}









